package com.gxa.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.stereotype.Component;

/**
 * 提供Layui数据表格统一处理的实体类
 */

@ApiModel("返回对象JsonResult")
@Component
public class JsonResult<T> {
    @ApiModelProperty(name = "code",notes = "状态码",dataType = "Integer",required = false)
     private Integer code; //返回的状态码
    @ApiModelProperty(name = "msg",notes = "返回消息,失败为FAILED，成功为SUCCESS",dataType = "String",required = false)
     private String msg; //返回的消息
    @ApiModelProperty(name = "count",notes = "返回总条数",dataType = "Integer",required = false)
     private Integer count; //返回总条数
    @ApiModelProperty(name = "data",notes = "返回数据",dataType = "Object",required = false)
     private T data; //返回的数据(Map、List、String......)

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
